/**
 * 				TestDataManager.java
 *				------------
 *		
 *   Author:	Moser Dominik
 *   ID:		bin04017
 *	 Created:	13.12.2006
 *	 Project:	MP3-Sync
 *	 Package:	junit
 *	 Usage:		
 */
package mochito.junit;

import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.rmi.RemoteException;

import mochito.dataClasses.DataManager;
import mochito.dataClasses.musicItem.MusicItem;

import org.junit.Test;



/**
 * @author bin04017
 *
 */
public class TestManager {

	private String fileName1 = "G:/MP3/Hagenberg - HGB.mp3";
	@Test
	public void DataManagerConsistensTest1() throws RemoteException{
		DataManager manager = new DataManager();
		MusicItem item = null;
		try {
			item = new MusicItem("dance");
			item.setFile(fileName1);
		} catch (RemoteException e) {
			fail("error musicItem");
		}
		manager.addMusicItem(item);
		assertTrue("dance".equalsIgnoreCase(manager.getMusicItem("dance").getName()));
		
	}
	
}
